Skip to content

Conversation

kushal4345
Copy link
Contributor

Summary

Updated the path examples documentation to clarify that route matching in Express.js is exact by default, unless path patterns, wildcards, or regular expressions are used.

Details

Previously, the docs said “This will match paths starting with…”, which could be interpreted as matching partial strings (e.g., /abcde) when using app.use('/abcd', ...). This is misleading because Express matches exact paths unless explicitly configured otherwise.

Change

@kushal4345 kushal4345 requested a review from a team as a code owner August 11, 2025 03:56
Copy link

netlify bot commented Aug 11, 2025

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 86aa1d9
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/68a29f959e6c6d00088802eb
😎 Deploy Preview https://deploy-preview-2036--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

github-actions bot commented Aug 11, 2025

🚦 Lighthouse Results (Mobile & Desktop)

URL Device Perf A11y Best Practices
/ mobile 🔴 63 🟢 100 🟢 96
/en/blog/posts.html mobile 🔴 73 🟢 96 🟢 96
/en/5x/api.html mobile 🔴 61 🟢 95 🟢 96
/ desktop 🟢 95 🟢 100 🟢 96
/en/blog/posts.html desktop 🟢 94 🟢 96 🟢 93
/en/5x/api.html desktop 🟢 93 🟢 95 🟢 96

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, just a small comment from my side.

@kushal4345
Copy link
Contributor Author

I’ve pushed the requested changes. Please let me know if anything else is needed

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @kushal4345!

@bjohansebas bjohansebas added 5.x Docs for 5.x version 4.x Docs for 4.x version labels Aug 18, 2025
@bjohansebas bjohansebas merged commit 53b9a0e into expressjs:gh-pages Aug 18, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Docs for 4.x version 5.x Docs for 5.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Path examples documentation is misleading
2 participants